######################################################
# makefile for ECDSA-CUDA
######################################################

UNAME := $(shell uname)

COMPILER_FLAGS =  -Wall -m64 
DEBUG_FLAGS = -O0 -g -DDEBUG=1
LINKER_FLAGS = -lntl -lm -lcrypto
COMPILER = clang++
INCLUDE_DIR= -I"/Users/endriu/homebrew/Cellar/ntl/5.5.2/include" -I"/Users/endriu/homebrew/Cellar/openssl/1.0.1c/include"
INCLUDE_LIB= -L"/Users/endriu/homebrew/Cellar/ntl/5.5.2/lib" -L"/Users/endriu/homebrew/Cellar/openssl/1.0.1c/lib" 

OBJ_FILES_DEBUG = main_debug.o
OBJ_FILES	= main.o 
EXEC_DEBUG = ecdsa_debug
EXEC		= ecdsa-cuda




$(EXEC) all:	$(OBJ_FILES)
		$(COMPILER) $(COMPILER_FLAGS) $(LINKER_FLAGS) $(INCLUDE_LIB) $(INCLUDE_DIR) -o $(EXEC) $(OBJ_FILES) \

$(EXEC_DEBUG) debug:	$(OBJ_FILES_DEBUG)
	$(COMPILER) $(COMPILER_FLAGS) $(DEBUG_FLAGS) $(LINKER_FLAGS) $(INCLUDE_LIB) $(INCLUDE_DIR) -o $(EXEC) $(OBJ_FILES_DEBUG)

main_debug.o: main.cpp
	$(COMPILER) $(COMPILER_FLAGS) $(DEBUG_FLAGS) $(INCLUDE_DIR) -c main.cpp -o main_debug.o
main.o: main.cpp
	$(COMPILER)  $(COMPILER_FLAGS) $(INCLUDE_DIR) -c main.cpp  

clean:
	\rm -f $(OBJ_FILES) $(EXEC)
